\hypertarget{cc__mpc__coldstart__contraintsevaluation_8m}{
\subsection{cc\_\-mpc\_\-coldstart\_\-contraintsevaluation.m File Reference}
\label{d3/dc3/cc__mpc__coldstart__contraintsevaluation_8m}\index{cc\_\-mpc\_\-coldstart\_\-contraintsevaluation.m@{cc\_\-mpc\_\-coldstart\_\-contraintsevaluation.m}}
}


The function evaluates the constraints matrices for the constrained MPC/RHC control.  


\subsubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
function \hyperlink{cc__mpc__coldstart__contraintsevaluation_8m_a56c7b67b72430ff83eb8c1e134baeb87}{cc\_\-mpc\_\-coldstart\_\-contraintsevaluation} (in Nc, in u\_\-max, in u\_\-min, in col\_\-B\_\-e)
\end{DoxyCompactItemize}


\subsubsection{Detailed Description}
The function evaluates the constraints matrices for the constrained MPC/RHC control. \begin{DoxyAuthor}{Author}
Mikhail Konnik 
\end{DoxyAuthor}
\begin{DoxyDate}{Date}
12 January 2012
\end{DoxyDate}
\hypertarget{d3/dc3/cc__mpc__coldstart__contraintsevaluation_8m_mpccoldstart}{}\subsubsection{Cold Start of the MPC controller}\label{d3/dc3/cc__mpc__coldstart__contraintsevaluation_8m_mpccoldstart}
The problem is typically formulated as a Quadratic Programming (QP) consisting of minimising the cost function$\sim$\{eq:costfunctionmpcHessian\}. In this paper we consider linear constraints for the control inputs:

$ M \cdot U \leq \eta, \mbox{ where } M = \left[ \begin{array}{c} I_{(N_c+1) \cdot m} \\ - I_{(N_c+1) \cdot m} \\ \end{array} \right] \mbox{ and } \eta = \left[\begin{array}{c}\mathbf{u}_{max} \\\mathbf{u}_{min} \\\end{array}\right], $

where $I_{(N_c+1) \cdot m}$ is the $(N_c+1) \cdot m\times (N_c+1) \cdot m$ identity matrix, $N_c$ is the control prediction horizon, and $m$ is the number of inputs. The matrix $\mathbf{u}_{max} = [u_{max,0}, u_{max,1}, \dots u_{max,N_c}]$ contains the maximum allowable inputs and the matrix $\mathbf{u}_{min} = [- u_{min,0}, - u_{min,1}, \dots - u_{min,N_c}]$ contains the minimum allowable inputs. The \{constrained solution\} for the RHC problem is then found by solving a QP \{at each sample instant\} of the form:

$ \operatorname*{min}_{U} \,\,\,\, \frac{1}{2} U^T \mathbb{H} U + U^T \mathbb{F} x ,\,\,\,\,\,\, \mbox{subject to : } M \cdot U \leq \eta $

where $U$ is a vector of future inputs. In the case when the Hessian matrix $\mathbb{H}$ is positive definite, which is the usually true for the adaptive optics, the quadratic optimisation problem is convex and therefore the constrained solution exists and is unique. 

Definition in file \hyperlink{cc__mpc__coldstart__contraintsevaluation_8m_source}{cc\_\-mpc\_\-coldstart\_\-contraintsevaluation.m}.



\subsubsection{Function Documentation}
\hypertarget{cc__mpc__coldstart__contraintsevaluation_8m_a56c7b67b72430ff83eb8c1e134baeb87}{
\index{cc\_\-mpc\_\-coldstart\_\-contraintsevaluation.m@{cc\_\-mpc\_\-coldstart\_\-contraintsevaluation.m}!cc\_\-mpc\_\-coldstart\_\-contraintsevaluation@{cc\_\-mpc\_\-coldstart\_\-contraintsevaluation}}
\index{cc\_\-mpc\_\-coldstart\_\-contraintsevaluation@{cc\_\-mpc\_\-coldstart\_\-contraintsevaluation}!cc_mpc_coldstart_contraintsevaluation.m@{cc\_\-mpc\_\-coldstart\_\-contraintsevaluation.m}}
\paragraph[{cc\_\-mpc\_\-coldstart\_\-contraintsevaluation}]{\setlength{\rightskip}{0pt plus 5cm}function cc\_\-mpc\_\-coldstart\_\-contraintsevaluation (
\begin{DoxyParamCaption}
\item[{in}]{ Nc, }
\item[{in}]{ u\_\-max, }
\item[{in}]{ u\_\-min, }
\item[{in}]{ col\_\-B\_\-e}
\end{DoxyParamCaption}
)}\hfill}
\label{d3/dc3/cc__mpc__coldstart__contraintsevaluation_8m_a56c7b67b72430ff83eb8c1e134baeb87}

\begin{DoxyParams}{Parameters}
\item[{\em Nc}]= control prediction horizon. \item[{\em u\_\-max}]= maximum constraint value. \item[{\em u\_\-min}]= minimal constraint value. \item[{\em col\_\-B\_\-e}]= number of inputs in the plant. \end{DoxyParams}

\begin{DoxyRetVals}{Return values}
\item[{\em gamma}]= discrete state evolution matrix A. \item[{\em M}]= discrete input matrix B. \end{DoxyRetVals}
